import Vue from "vue";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import App from "@/App.vue";
import router from "@/router";
import store from "@/store";
import axios from "axios";
import "./DateFormat";

Vue.config.productionTip = false;
Vue.use(ElementUI);
Vue.prototype.$http = axios;

Vue.filter("dateFormat", function(value, fmt = "yyyy-MM-dd hh:mm:ss") {
  try {
    return new Date(value).Format(fmt);
  } catch (e) {
    return "";
  }
});

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
